ZSH terminal
Install zsh
- Install zsh in Arch Linux
sudo pacman -S zsh
- Set Zsh as default shell
chsh -s /usr/bin/zsh
# or
sudo chsh -s $(which zsh)
- Log out and then login again to your terminal to use the new Zsh shell.
echo $SHELL
/usr/bin/zsh
- Install oh-my-zsh using curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Use agnoster zsh theme
Edit the ~/.zshrc file, edit this following line
ZSH_THEME="robbyrussell"
Into
ZSH_THEME="agnoster" # (this is one of the fancy ones)
# see https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster
Save the file, and then open a new terminal to see the changes that we did
- Install powerlevel10k for Oh my zsh
Run this following command :
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Now, edit the ZSH_THEME in ~/.zshrc file into :
ZSH_THEME="powerlevel10k/powerlevel10k"
Open a new terminal, and you should see the powerlevel10k theme has applied. If the p10k configuration wizard does not start automatically, you can run the configuration wizard the powerlevel10k theme with this command :
p10k configure
After you run the command above, p10k will prompt some questions, and you can choose the answer based on your personal preferences.
- Install plugins (zsh-autosuggestions and zsh-syntax-highlighting)
Download zsh-autosuggestions :
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
Download zsh-syntax-higlighting :
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
Edit ~/.zshrc file, find plugins=(git) replace plugins=(git) with :
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Reopen your terminal, now you should be able to use the auto suggestions and syntax highlighting.
Category: Linux | Comments: 0